package GUI;

import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
/**
 * * This class creates instance of DetermineDurationGui	
 * to display when needed
 * @author aviat
 *
 */
public class DetermineDurationGui extends JPanel {
	

	private static final long serialVersionUID = 1L;
	private JComboBox comboBox_2;
	private JComboBox comboBox_3;
	private JComboBox comboBox_4;
	private JComboBox comboBox_1;
	private JButton submitBtn;
	private JButton cancelBtn;
	private JTextField stage1_dur;
	private JTextField stage2_dur;
	private int[] days = new int[7];
	private JComboBox reqNum;
	private JLabel lblChooseReqNum;
	
	/**
	 * the constructor
	 */
	public DetermineDurationGui(){
		super();
		comboBox_1 = new JComboBox();
		comboBox_1.setModel(new DefaultComboBoxModel(new String[] {"", "APPROVAL", "NOT APPROVAL"}));
		comboBox_2 = new JComboBox();
		comboBox_2.setModel(new DefaultComboBoxModel(new String[] {"", "1", "2", "3", "4", "5", "6", "7"}));
		comboBox_3 = new JComboBox();
		comboBox_3.setModel(new DefaultComboBoxModel(new String[] {"", "APPROVAL", "NOT APPROVAL"}));
		comboBox_4 = new JComboBox();
		comboBox_4.setModel(new DefaultComboBoxModel(new String[] {"", "1", "2", "3", "4", "5", "6", "7"}));
		reqNum = new JComboBox();
		cancelBtn = new JButton("CANCEL");
		cancelBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		submitBtn = new JButton("SUBMIT");
		initialize();
	}
	
	
	/**
	 * This method initializes the DetermineDurationGui
	 */
	public void initialize(){
		int i=0;
		for(i=1;i<days.length;i++)
			days[i]=i;
		JLabel lblDetermineStageManager = new JLabel("DETERMINE STAGE DURATION WINDOW");
		lblDetermineStageManager.setForeground(Color.BLUE);
		lblDetermineStageManager.setFont(new Font("Arial", Font.BOLD, 17));
		lblDetermineStageManager.setBounds(52, 33, 339, 36);
		add(lblDetermineStageManager);
		
		JLabel lblEstimationStage = new JLabel("ESTIMATION STAGE:");
		lblEstimationStage.setFont(new Font("Arial", Font.BOLD, 12));
		lblEstimationStage.setBounds(52, 131, 122, 20);
		add(lblEstimationStage);
		
		comboBox_1.setBounds(210, 124, 145, 36);
		add(comboBox_1);
		
		JLabel lblExaminationStage = new JLabel("EXAMINATION STAGE:\r\n");
		lblExaminationStage.setFont(new Font("Arial", Font.BOLD, 12));
		lblExaminationStage.setBounds(52, 186, 133, 20);
		add(lblExaminationStage);
		
		JLabel lblPerformanceStage = new JLabel("PERFORMANCE STAGE:");
		lblPerformanceStage.setFont(new Font("Arial", Font.BOLD, 12));
		lblPerformanceStage.setBounds(52, 248, 133, 20);
		add(lblPerformanceStage);
		
		JLabel lblTestingStage = new JLabel("TESTING STAGE:");
		lblTestingStage.setFont(new Font("Arial", Font.BOLD, 12));
		lblTestingStage.setBounds(52, 301, 122, 20);
		add(lblTestingStage);
		
		comboBox_2.setBounds(210, 180, 145, 35);
		add(comboBox_2);
		
		
		comboBox_3.setBounds(210, 244, 145, 30);
		add(comboBox_3);
		
		comboBox_4.setBounds(210, 297, 145, 30);
		add(comboBox_4);
		
		cancelBtn.setFont(new Font("Arial", Font.BOLD, 12));
		cancelBtn.setBounds(66, 359, 89, 30);
		add(cancelBtn);
		
		submitBtn.setFont(new Font("Arial", Font.BOLD, 12));
		submitBtn.setBounds(317, 359, 89, 30);
		add(submitBtn);
		
		setLayout(null);
		setSize(new Dimension(500, 411));	
		
		stage1_dur = new JTextField();
		stage1_dur.setBounds(392, 132, 86, 20);
		add(stage1_dur);
		stage1_dur.setColumns(10);
		
		stage2_dur = new JTextField();
		stage2_dur.setColumns(10);
		stage2_dur.setBounds(392, 249, 86, 20);
		add(stage2_dur);
		
		reqNum.setBounds(210, 74, 145, 30);
		add(reqNum);
		
		lblChooseReqNum = new JLabel("CHOOSE REQ NUM:");
		lblChooseReqNum.setFont(new Font("Arial", Font.BOLD, 12));
		lblChooseReqNum.setBounds(48, 80, 126, 24);
		add(lblChooseReqNum);
	}
	/**
	 * 
	 * @return JComboBox with the resolution chosen for stage 1
	 */
	public JComboBox getStage1(){
		return comboBox_1;
	}
	/**
	 * 
	 * @return JComboBox with the duration chosen for stage 2
	 */
	public JComboBox getStage2(){
		return comboBox_2;
	}
	/**
	 * 
	 * @return JComboBox with the resolution chosen for stage 3
	 */
	public JComboBox getStage3(){
		return comboBox_3;
	}
	/**
	 * 
	 * @return JComboBox with the duration chosen for stage 4
	 */
	public JComboBox getStage4(){
		return comboBox_4;
	}
	/**
	 * 
	 * @return JComboBox with the request number
	 */
	public JComboBox getReqNum(){
		return reqNum;
	}
	/**
	 * 
	 * @return JTextField with the amount of day for extended in stage 1
	 */
	public JTextField getstage1_dur(){
		return stage1_dur;
	}
	/**
	 * 
	 * @return  JTextField with the amount of day for extended in stage 3
	 */
	public JTextField getstage2_dur(){
		return stage1_dur;
	}
	/**
	 * 
	 * @return JButton the submit button
	 */
	public JButton getSubBtn(){
		return submitBtn;
	}
	/**
	 * 
	 * @returnJButton the cancel button
	 */
	public JButton getCancelBtn(){
		return cancelBtn;
	}
	/**
	 * 
	 * @param comboBox_1 to set the stage 1 comboBox
	 */
	public void setComboBox_1(JComboBox comboBox_1) {
		this.comboBox_1 = comboBox_1;
	}
	/**
	 * 
	 * @param comboBox_2   to set the stage 2 comboBox
	 */
	public void setComboBox_2(JComboBox comboBox_2) {
		this.comboBox_2 = comboBox_2;
	}

	/**
	 * 
	 * @param comboBox_3  to set the stage 3 comboBox
	 */
	public void setComboBox_3(JComboBox comboBox_3) {
		this.comboBox_3 = comboBox_3;
	}

	/**
	 * 
	 * @param comboBox_4   to set the stage 4 comboBox
	 */
	public void setComboBox_4(JComboBox comboBox_4) {
		this.comboBox_4 = comboBox_4;
	}

	/**
	 * 
	 * @param submitBtn to set the submit button
	 */
	public void setSubmitBtn(JButton submitBtn) {
		this.submitBtn = submitBtn;
	}
	/**
	 * 
	 * @param stage1_dur to set stage1 duration
	 */
	public void setStage1_dur(JTextField stage1_dur) {
		this.stage1_dur = stage1_dur;
	}
	/**
	 * 
	 * @param stage2_dur to set stage duration
	 */
	public void setStage2_dur(JTextField stage2_dur) {
		this.stage2_dur = stage2_dur;
	}

	public int[] getDays() {
		return days;
	}
	public void setDays(int[] days) {
		this.days = days;
	}
	/**
	 * 
	 * @param cancelBtn to set cancel button
	 */
	public void setCancelBtn(JButton cancelBtn) {
		this.cancelBtn = cancelBtn;
	}
	public JComboBox getComboBox_2() {
		return comboBox_2;
	}


	public JComboBox getComboBox_3() {
		return comboBox_3;
	}


	public JComboBox getComboBox_4() {
		return comboBox_4;
	}


	public JComboBox getComboBox_1() {
		return comboBox_1;
	}
}

